<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@include file="/common/taglibs.jsp" %>
<div class="pageHeader">
<form rel="pagerForm" onsubmit="return navTabSearch(this);" action="${ctx}/attachment/list" method="get" id="searchForm">
	<div class="searchBar">
		<table class="searchContent">
			<tr>
				<td>
					&nbsp;&nbsp;文件名:<input type="text" name="filter_LIKES_originalName" value="${param['filter_LIKES_originalName'] }" class="required"/>		
				</td>
                <td>
                    <div class="subBar" style="margin-top:-4px;">
                        <ul style="float:left;">
                            <li><div class="buttonActive"><div class="buttonContent"><button type="submit">查询</button></div></div></li>
                        </ul>
                    </div>
                </td>
			</tr>
		</table>
	</div>
</form>
</div>
<div class="pageContent">
	<div class="panelBar">
		<ul class="toolBar">
			<li><a title="确实要删除吗?" target="selectedTodo" rel="ids" href="${ctx}/attachment/batchDelete" class="delete"><span>删除</span></a></li>
			<li class="line">line</li>
		</ul>
	</div>
	<table class="table" width="100%" layoutH="112">
		<thead>
			<tr>
				<th width="30"><input type="checkbox" group="ids" class="checkboxCtrl"></th>
				<th width="200">文件名</th>
				<th width="200">业务类型</th>
				<th width="100">文件大小(KB)</th>
				<th width="200">上传时间</th>
				<th width="160">操作</th>
			</tr>
		</thead>
		<tbody>
        <c:if test="${listPage.items == null}">
	    	<tr><td><center>抱歉，没有任何记录。</center></td></tr>
	    </c:if>
        
		<c:forEach var="pojo" items="${listPage.items}">
			<tr target="pojo_id" rel="${pojo.id}">
				<td><input id="${random}${pojo.id}" name="ids" value="${pojo.id}" type="checkbox"></td>
				<td onclick="selectBox('${random}${pojo.id}')">${pojo.originalName}</td>
				<td onclick="selectBox('${random}${pojo.id}')">${pojo.businessType}</td>
				<td onclick="selectBox('${random}${pojo.id}')">${pojo.fileSize/1000}</td>
				<td onclick="selectBox('${random}${pojo.id}')">${pojo.uploadTime}</td>
				<td>
					<a title="删除" target="ajaxTodo" href="${ctx}/attachment/delete/${pojo.id}" class="btnDel">删除</a>
					<a title="下载" href="${ctx}/attachment/download/${pojo.id}">下载</a>
				</td>
			</tr>
		</c:forEach>
		</tbody>
	</table>
	<div class="panelBar">
		<div class="pages">
			<span>每页</span>
			<select class="combox" name="numPerPage" change="navTabPageBreak" param="numPerPage">
				<option value="1">调整</option>
				<option value="10">10</option>
				<option value="20">20</option>
				<option value="50">50</option>
				<option value="100">100</option>
				<option value="200">200</option>
			</select>
			<span>条，共${listPage.totalNum}条记录，每页${listPage.numPerPage}条，当前第${listPage.pageNum}/${listPage.pageCount}页</span>
		</div>
		
		<div class="pagination" targetType="navTab" totalCount="${listPage.totalNum}" numPerPage="${listPage.numPerPage}" pageNumShown="10" currentPage="${listPage.pageNum}">
		</div>
		<form:form id="pagerForm" modelAttribute="page" method="get" action="${ctx}/attachment/list">
			<input type="hidden" name="pageNum" value="${listPage.pageNum}" />
			<input type="hidden" name="numPerPage" value="${listPage.numPerPage}" />
		</form:form>

	</div>
</div>

